<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="UTF-8"%>

<jsp:useBean id="db" class="com.zipishu.DataBaseConnection">
</jsp:useBean>
<%
    int a=0;
    int b=0;
    int c=0;
    int d=0;
    Connection dbc = db.getConnection();
	Statement stmtc = dbc.createStatement();
	String sql="SELECT * FROM class";
	ResultSet rsc = stmtc.executeQuery(sql);
	
	Connection dbe = db.getConnection();
	Statement stmte = dbe.createStatement();
	String sqle="SELECT * FROM emotion";
	ResultSet rse = stmte.executeQuery(sqle);
	
	Connection dbs = db.getConnection();
	Statement stmts = dbs.createStatement();
	String sqls="SELECT * FROM shortcut";
	ResultSet rss = stmts.executeQuery(sqls);
	
	Connection dbb = db.getConnection();
	Statement stmtb = dbb.createStatement();
	String sqlb="SELECT * FROM bustime";
	ResultSet rsb = stmtb.executeQuery(sqlb);	
    

 %>
<div class="align-left">
				<div id="left-menu">
					<h3 class="city_info"><span>城市情报</span></h3>
					<p>
						<%while(rsc.next()){
						a++;%>
						  <a href="item.jsp?classid=<%=rsc.getInt("classid")%>"><%=rsc.getString("classname") %></a>|
						  <%if(a==4) {
						  out.println("<br/>");
						    }
					   	  }%>
					</p>
					<h3 class="emotion_map"><span>情绪地图</span></h3>
					<p>
                      <%while(rse.next()){ 
                       b++;%>
                        <a href="emotion_map.jsp?emotionid=<%=rse.getInt("emotionid")%>"><%=rse.getString("emotionname") %></a>|
                        <% if(b==3) { out.println("<br/>");}%>
						<%}%>
					</p>	
					<h3 class="les_shortcut"><span>休闲快捷</span></h3>
					<p>
					<%while(rss.next()){ 
					c++;%>
					  <a href="leisure_shortcut.jsp?shortid=<%=rss.getInt("shortid")%>"><%=rss.getString("shortname") %>|
                        <%if(c==5) {out.println("<br/>");} %>
						<%}%>
					</a></p>			
					<h4 class="les_24h"><span>休闲24小时</span></h4>
					<p>
					<%while(rsb.next()){ d++;%>
					<a href="leisure_shortcut.jsp?timeid=<%=rsb.getInt("timeid")%>"><%=rsb.getString("timename") %></a>|
                        <%if(d==4) {out.println("<br/>");} %>
						<%}%>
					</p>	
					<h4 class="les_ind"><span>个性休闲</span></h4>
					<p>
						最具人气的十个酒吧<br /> 
						看的到西湖的咖啡馆<br /> 
						异国风情的餐厅<br /> 
						地道杭帮的餐厅<br /> 
						明星老板主题餐厅<br /> 
						设计师主题餐厅<br /> 
						拿风景下饭的主题餐厅<br /> 
						情景文化主题餐厅<br /> 
						适合商务会餐的餐厅<br /> 
						适合闺中密友的餐厅<br /> 
						适合初次邂逅去的餐厅<br /> 
						适合亲密爱人去的餐厅<br /> 
						适合三口之家去的餐厅<br /> 
					</p>	
				</div>
				<div class="ads">
					<img src="./images/ads_1.png" />
				</div>
			</div>
			<div id="content" class="align-right">
			<%
			  rsb.close();
			  rss.close();
			  rse.close();
			  rsc.close();
			  
			  dbb.close();
			  dbs.close();
			  dbe.close();
              dbc.close();			
			%>